﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Maverick.WebUI.Models.MessageListViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	List
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%= Model.Parent.Title %></h2>
    
    <% foreach(var Message in Model.Messages) { %>
    <article>                    
            <header>
                <%= Html.ActionLink("Edit post", "Edit", "Messages", new { parentID = Message.ParentID, messageID = Message.MessageID, title = Model.Parent.TitleUrl }, null)%>
                 |
                <%= Html.ActionLink("Delete post", "Delete", "Messages", new { parentID = Message.ParentID, messageID = Message.MessageID, title = Model.Parent.TitleUrl }, null)%>
                <cite><!-- a href="#view-author-profile" --><%= Message.Author %><!-- /a --></cite>
                <time datetime="2011-02-01T08:37" pubdate="pubdate"><%= Message.DateTime %></time>
            </header>    
            <%= Message.Text %>
    </article>    
    <% } %>

<%= Html.ActionLink("Post reply", "Add", "Messages") %>
</asp:Content>
